package com.cuit.service.impl;

import com.cuit.dao.DepartmentDao;
import com.cuit.doamin.Department;
import com.cuit.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    @Override
    public boolean add(Department department) {

        return departmentDao.add(department);
    }

    @Override
    public boolean delete(Department department) {
        return departmentDao.delete(department);
    }

    @Override
    public boolean update(Department department) {

        return departmentDao.update(department);
    }

    @Override
    public List<Department> findAll() {

        return departmentDao.findAll();
    }
}
